package com.huarui.code.model;

import java.util.Date;
import java.util.HashMap;
import java.util.Map;

import org.ewaf.framework.model.IDataObject;

import com.huarui.company.model.Company;

public class CodeGeneric implements IDataObject {

	private static final long serialVersionUID = -8803617512343762001L;

	/**
	 * 采购订单
	 */
	public static final String PURCHASE_ORDER = "purchaseOrder";

	/**
	 * 销售订单
	 */
	public static final String SALE_ORDER = "saleOrder";

	/**
	 * 入库单
	 */
	public static final String RECEIVE = "receive";
	/**
	 * 退货单
	 */
	public static final String RETURNED = "returned";

	/**
	 * 销售单
	 */
	public static final String SALE = "sale";
	/**
	 * 销售退货单
	 */
	public static final String SALE_RETURN = "saleReturn";

	/**
	 * 期初单
	 */
	public static final String INITIAL = "initial";
	/**
	 * 应付款
	 */
	public static final String PAYABLE = "payable";
	/**
	 * 付款单
	 */
	public static final String PAYINVOICE = "payInvoice";
	/**
	 * 应收款
	 */
	public static final String RECEIVABLE = "receivable";
	/**
	 * 收款单
	 */
	public static final String SALEINVOICE = "saleInvoice";
	/**
	 * 急件单
	 */
	public static final String EXPRESS = "express";
	
	public static final Map<String, String> DocumentMap = new HashMap<String, String>();
	
	static {
		DocumentMap.put(PURCHASE_ORDER, "CD");
		DocumentMap.put(SALE_ORDER, "XD");
		DocumentMap.put(RECEIVE, "CR");
		DocumentMap.put(RETURNED, "CT");
		DocumentMap.put(SALE, "XC");
		DocumentMap.put(SALE_RETURN, "XT");
		DocumentMap.put(INITIAL, "QR");
		DocumentMap.put(PAYABLE, "YF");
		DocumentMap.put(PAYINVOICE, "FK");
		DocumentMap.put(RECEIVABLE, "YS");
		DocumentMap.put(SALEINVOICE, "SK");
		DocumentMap.put(EXPRESS, "EX");
	}
	
	private Integer id;
	private Integer companyId;
	private Date gmtDate;
	private String documentName;
	private Integer lastNumber;
	private String lastCode;

	@Override
	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public Integer getCompanyId() {
		return companyId;
	}

	public void setCompanyId(Integer companyId) {
		this.companyId = companyId;
	}

	public Date getGmtDate() {
		return gmtDate;
	}

	public void setGmtDate(Date gmtDate) {
		this.gmtDate = gmtDate;
	}

	public String getDocumentName() {
		return documentName;
	}

	public void setDocumentName(String documentName) {
		this.documentName = documentName;
	}

	public Integer getLastNumber() {
		return lastNumber;
	}

	public void setLastNumber(Integer lastNumber) {
		this.lastNumber = lastNumber;
	}

	public String getLastCode() {
		return lastCode;
	}

	public void setLastCode(String lastCode) {
		this.lastCode = lastCode;
	}

}
